package cn.com.wind.bdg.inmysql.inmysql;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import cn.com.wind.bdg.inmysql.inmysql.service.Data2DataBase;
import cn.com.wind.bdg.inmysql.inmysql.service.Data2ES;

@SpringBootApplication
public class InmysqlApplication implements ApplicationRunner {

	public static void main(String[] args) {
		SpringApplication.run(InmysqlApplication.class, args);
	}

	@Autowired
	Data2DataBase data2DataBase;
	@Autowired
	Data2ES data2ES;
	@Override
	public void run(ApplicationArguments args) throws Exception {
		//执行数据插入数据库操作
//		data2DataBase.method();
		//执行数据插入es
		data2ES.method();
	}

}
